# coding=utf-8
import csv
import os
import sys
sys.path.append(os.getcwd())
# from Sequence.system import SystemMain as system


class ConditionCsvProcess():
    @classmethod
    def getCsvContent(cls):
        contentArray = []
        # main_csv_parent_directory = os.path.abspath(os.path.dirname(__file__))
        condition_csv_parent_directory = os.path.abspath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
        condition_csv_path = os.path.join(condition_csv_parent_directory,"Assets/Limit.csv")
        with open(condition_csv_path,encoding = "utf-8-sig",mode = "r") as f:
            dictReader = csv.DictReader(f)
            for row in dictReader:
                perLineDic = {}
                perLineDic["ConditionName"] = row["ConditionName"]
                perLineDic["Values"] = row["Values"]
                perLineDic["Dynamic"] = row["Dynamic"]
        
                contentArray.append(perLineDic)
        return contentArray
if __name__ == "__main__":
    print("start conditionCsv")
    # print(MainCsvProcess.getCsvContent())

